package org.bonorsoft.modules.mobile.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.bonorsoft.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("sys_user")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MobileUser implements Serializable {
    private static final long serialVersionUID = 1L;

    /**主键id*/
    @TableId(type = IdType.ID_WORKER_STR)
    private String id;
    /**登录账号*/
    @Excel(name = "登录账号", width = 15)
    private String username;
    /**真实姓名*/
    @Excel(name = "真实姓名", width = 15)
    private String realname;
    /**密码*/
    @Excel(name = "密码", width = 15)
    private String password;
    /**md5密码盐*/
    @Excel(name = "md5密码盐", width = 15)
    private String salt;
    /**头像*/
    @Excel(name = "头像", width = 15)
    private String avatar;
    /**生日*/
    @Excel(name = "生日", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date birthday;
    /**性别(0-默认未知,1-男,2-女)*/
    @Excel(name = "性别(0-默认未知,1-男,2-女)", width = 15)
    private Integer sex;
    /**电子邮件*/
    @Excel(name = "电子邮件", width = 15)
    private String email;
    /**电话*/
    @Excel(name = "电话", width = 15)
    private String phone;
    /**状态(1-正常,2-冻结)*/
    @Excel(name = "状态(1-正常,2-冻结)", width = 15, dicCode = "sys_user_status")
    @Dict(dicCode = "sys_user_status")
    private Integer status;
    /**删除状态(0-正常,1-已删除)*/
    @Excel(name = "删除状态(0-正常,1-已删除)", width = 15)
    private Integer delFlag;
    /**创建人*/
    @Excel(name = "创建人", width = 15)
    private String createBy;
    /**创建时间*/
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**更新人*/
    @Excel(name = "更新人", width = 15)
    private String updateBy;
    /**更新时间*/
    @Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**备注*/
    private String remark;
    @Excel(name = "登录部门", width = 15, dictTable ="sys_dept",dicText = "dept_name",dicCode = "dept_id")
    @Dict(dictTable ="sys_dept",dicText = "dept_name",dicCode = "dept_id")
    private java.lang.Long deptId;
    /**用户唯一标识*/
    private java.lang.String openid;
    /**唯一标识*/
    private java.lang.String unionid;
}
